8c2540e5f6fb5d5bef5a299f6e6efc371f3834b2,src/com/jfoenix/skins/JFXPasswordFieldSkin.java,JFXPasswordFieldSkin,createFloatingLabel,#,299
Before Change
promptContainer.getChildren().add(promptText);
if(triggerFloatLabel){
promptText.setTranslateY(-textPane.getHeight());
promptText.setTranslateX(-(promptText.getLayoutBounds().getWidth()*0.15)/2);
promptText.setLayoutY(0);
promptText.setScaleX(0.85);
promptText.setScaleY(0.85);
}
}
promptTextUpTransition = new CachedTransition(textPane, new Timeline(
new KeyFrame(Duration.millis(1300),
new KeyValue(promptText.translateYProperty(), -textPane.getHeight(), Interpolator.EASE_BOTH),
new KeyValue(promptText.translateXProperty(), - (promptText.getLayoutBounds().getWidth()*0.15 )/ 2, Interpolator.EASE_BOTH),
new KeyValue(promptText.scaleXProperty(),0.85 , Interpolator.EASE_BOTH),
new KeyValue(promptText.scaleYProperty(),0.85 , Interpolator.EASE_BOTH)))){{ setDelay(Duration.millis(0)); setCycleDuration(Duration.millis(240)); }};
promptTextColorTransition = new CachedTransition(textPane, new Timeline(
new KeyFrame(Duration.millis(1300),
new KeyValue(promptTextFill, ((JFXPasswordField)getSkinnable()).getFocusColor(), Interpolator.EASE_BOTH))))
{
{ setDelay(Duration.millis(0)); setCycleDuration(Duration.millis(160)); }
protected void starting() {super.starting(); oldPromptTextFill = promptTextFill.get();};
};
promptTextDownTransition = new CachedTransition(textPane, new Timeline(
new KeyFrame(Duration.millis(1300),
new KeyValue(promptText.translateYProperty(), 0, Interpolator.EASE_BOTH),
new KeyValue(promptText.translateXProperty(), 0, Interpolator.EASE_BOTH),
new KeyValue(promptText.scaleXProperty(),1 , Interpolator.EASE_BOTH),
new KeyValue(promptText.scaleYProperty(),1 , Interpolator.EASE_BOTH))))
{{ setDelay(Duration.millis(0)); setCycleDuration(Duration.millis(240));}};
promptTextDownTransition.setOnFinished((finish)->{
promptText.setTranslateX(0);
After Change
e.printStackTrace();
}
}
promptText.getTransforms().add(promptTextScale);
promptContainer.getChildren().add(promptText);
if(triggerFloatLabel){
promptText.setTranslateY(-textPane.getHeight());
promptTextScale.setX(0.85);
promptTextScale.setY(0.85);
}
}
promptTextUpTransition = new CachedTransition(textPane, new Timeline(
new KeyFrame(Duration.millis(1300),
new KeyValue(promptText.translateYProperty(), -textPane.getHeight(), Interpolator.EASE_BOTH),
new KeyValue(promptTextScale.xProperty(), 0.85 , Interpolator.EASE_BOTH),
new KeyValue(promptTextScale.yProperty(), 0.85 , Interpolator.EASE_BOTH)))){{ setDelay(Duration.millis(0)); setCycleDuration(Duration.millis(240)); }};
promptTextColorTransition = new CachedTransition(textPane, new Timeline(
new KeyFrame(Duration.millis(1300),